package com.wuyixu.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageInfo;
import com.wuyixu.domain.Brand;
import com.wuyixu.service.BrandService;

@Controller
@RequestMapping("brand")
public class BrandController {
	@Reference
	private BrandService brandService;
	@RequestMapping("select")
	public String selects(Model model,Brand brand,@RequestParam(defaultValue="1")Integer pageNum,@RequestParam(defaultValue="3")Integer pageSize){
		PageInfo<Brand> info = brandService.list(brand, pageNum, pageSize);
		model.addAttribute("info", info);
		return "brand/list";
	}
}
